Rudimentary frame wait implemented. Does not work!