Fixed issue #7. Need to look into a permanent solution