Fixed #5 by flushing temp registers after assign