Minor bug and test fixes for sequelize + more robust error handling