fixed silly Swift issues with scalar values