Fixes multiple form issue

Fixes issue #1 and #3 in the original repo