Fixed createTable error handling