improved server validation of num_positions
fixed php notices