fix getlowerbound function