minor updates
fixed possible sql injection leaks