Merged in sssemil's changes