Made changes suggested by _chaos