Catch instances less than zero error

This change prevents the number of App instances being set to a negative
number

additional test in app_spec