changed Exception to RuntimeException in compileLock()