[FIX] error handling, additional tests