fixed some issues but more bugs