fixed two more bugs