Fixed a bug with resume statements