Optimize some statements

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>