Fixed the issue with exception thrown. Thank you @Ocramius