Fixed the ASM locking bug, still open issues