fixed an bug if the field has a size that is no square