Made a bit more efficient.
Fixed silly error.