bug fixes

findFreePage functions