fixed faulty logic in fromBean