Fixing wrong size check.

- Fixing reverted comparison.
- Adding details to the exception message.