fix the same issue as previously fix by Wouter