fix I-114531

also fixes I-112159
Merge pull request #262 from topcoderinc/dan-I-114531

fix I-114531