Fix some security issues described by Joe Cheng