Added changes suggested by @hvelarde