Fix #2114

#2114 from @ImTheFish