Fix for item #1133

This fixes:
http://ae-mod.info/Tracker/1133/
It shouldn't be, if I didn't do anything horribly wrong, since I added the function in the first place