Resolved clearCache bug and permalink error