Fixed the bug: test returns the correct boolean value