 *after restarting VS this function works normally