Fixed wrong encryption flag being set.
Fixed formatting.