fixed basic bugs