set correct paramaters in prepared statements;

this should probably go into master as well