Fix miscellanious issues