Fixed bug if bgmap was missing from permalink
Removed debug output