make changes a bit more robust

Signed-off-by: Joshua Rubin <jrubin@zvelo.com>