bug fixes, style changes