Invalid quantity when using form