Fixed compile error and warning.