fix undefined values for bubble positions