fixed awfully dirty hack