Fix bug in assembly