* Fixed an unexpected error
* Code refactored