Fix issues by Mark