fixed big and little bugs from last commit