fixed #2 - TypeError exception