Made the thing more robust