Fixed first bug report in #525