fix warnings due to -Wparentheses