Task #47 done

And few other logic errors were removed which were found in admin
functionalities.