Added check for frames left in queue #168