Resolved several /W4 warnings