fixed few last bugs