fix rest of bugs