fixing bgapi