Fix #377 #379

Merged
merged 3 commits into from Apr 9, 2013