Fixed a bug concerning formCount