Add reload command, fix a few bugs