Fix limit offset values quoting in sql

Fix limit offset values quoting in sql and throw an exception if values are non-integer