Fixed a few bugs in 5.2