patmos: removing latches