added status check
fix for #250