Fixing profile issues

Fixed profile tab problems and associated tests