bug fixes & cosmetic