fix bugs after testing on catalyst