Fixed a slight problem with the form apply function.