Fix potential SQL error upon registration.
Change post edition to actually bring the thread to the top if the last post is edited instead of just marking it new.