small changes to fix bugs