Fixed bug with import blocking at wrong point