bug fix with "intval"