fixing errors in assembly refactor