fixed some initial bugs