Added check. Works for simple testing purposes.