changed error handling if missing form
upped version