map fixes

make ssl friendly and sanitize input