bugfixed for issue 109, support BAE