give priority if there is something on the stack during cleanup step
add missing delayed trigger for Ray of Command

fixes issue 503