Your code looks right as far as the two lines you say are giving you trouble. Double check that your G54 is set correctly. Also if you are just wanting to move your table away before tool changes, use an offset that you don't typically use. Our shop has mainly Haas machines so there are a ton of extra offsets to use. You can so something like G0 G90 G58 x0 Y0. Then you just set G58 X0 Y0 where ever you want the table to go before the tool change. We find this is the easiest way because then zero is hard coded in the post but you can move it anywhere depending on what you are working on by just changing where G58 is set.