removed infinite loop block