Made changes suggested by nimdahk