Fixed multiple selection bug caused by the fact that selections are sometimes arrays and sometimes not. It concerns me a bit that I can't reproduce this in a test case, but this bugfix solved my real-world error. #notsupposedtohappen