Fixed a global variable and improved the [].hasAll-function.