Fix bug with data types