fixed bug that meant operations were not executed in queued order. added test case and modified existing