First off I am 99% sure that you cannot wait for anything less than whole seconds, so that is likely the issue with you first macro. Your second one looks like it should work just fine. I can offer two possibilities. One could be due to network lag. I am unsure if the entire macro is sent to the server to run or if it sends each line to run once the other one has processed. The second possibility is that you were possibly level synced and did not have access to the abilities at your synced level.

Hope this helps.