Fix cakefile and Fix defered in sw viewer