fixes wrong return value