fixed some breaking bugs