Fixed issue with parameter isMiddlePage