Read correct number of params
Fix all compile time warnings