Bug fixes in forms