bug fixes

-- malloc was being called on incorrect row in io.c
-- logsumexp needed to add the max