Fixed some version 4.0 Bugs

v4.0 had bugs due to negligence.
Sorry, for inconvenience.