Improve performance (via @tizoc)