Fix bug with create bean