Fixes as per #266