Fix as per @mtbc's suggestion