Simplified condition

[54f05b7ef60d6d7cb2e34815c44a6ccfb70bda0c]
Improved code style

[b713e381f89308af38ea0b939fc5bca9e13e7425]