Fixes several account bugs