Applied patch from muhammadwajeeh