Fixed Q.extend dealing with arrays