Bug fixes and customizations