Added some slight error checking to WPM