returnUrl bugfix/workaround added and other minor bugfixes