Fixing PHP warning.
Minor - format code.
If is null set minimun as 0.