work around for nan problem