Fix stubbed functions for testing