fix some warings
remove unneeded codes