bugfixes to hsmax

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>