General bug fixes and improved profile pabe