fix bugs

Signed-off-by: Matthew Dahmer <matthew.dahmer@gmail.com>