some bug fixes. LOL