fixed issue with errors caused by non-numeric types