small changes and bugs