Fixed amateurish deadlock