minnor bugs corrected