Index: trunk/src/engine/mesh_manager.cc
===================================================================
--- trunk/src/engine/mesh_manager.cc	(revision 550)
+++ trunk/src/engine/mesh_manager.cc	(revision 551)
@@ -29,7 +29,7 @@
 }
 
-nv::resource< nv::data_channel_set > nv::mesh_data_manager::get_path( const string_view& path, resource< mesh_data > default /*= resource< mesh_data >()*/, data_node_info* info /*= nullptr */ )
+nv::resource< nv::data_channel_set > nv::mesh_data_manager::get_path( const string_view& path, resource< mesh_data > def /*= resource< mesh_data >()*/, data_node_info* info /*= nullptr */ )
 {
-	nv::resource< nv::mesh_data > mr = default;
+	nv::resource< nv::mesh_data > mr = def;
 
 	nv::string_view sub_mesh_name;
Index: trunk/src/image/png_writer.cc
===================================================================
--- trunk/src/image/png_writer.cc	(revision 550)
+++ trunk/src/image/png_writer.cc	(revision 551)
@@ -12,5 +12,5 @@
 #include <stdarg.h>  
 
-using namespace nv;
+//using namespace nv;
 
 #if NV_COMPILER == NV_CLANG
@@ -33,8 +33,8 @@
 };
 
-#define STBI_MALLOC(sz)     nvmalloc(sz)
-#define STBI_REALLOC(p,sz)  nvrealloc(p,sz)
-#define STBI_FREE(p)        nvfree(p)
-#define STBI_MEMMOVE(d,s,c) nvmemmove(d,s,c)
+#define STBI_MALLOC(sz)     nv::nvmalloc(sz)
+#define STBI_REALLOC(p,sz)  nv::nvrealloc(p,sz)
+#define STBI_FREE(p)        nv::nvfree(p)
+#define STBI_MEMMOVE(d,s,c) nv::nvmemmove(d,s,c)
 
 typedef void stbi_write_func( void *context, void *data, int size );
@@ -57,7 +57,7 @@
 
 template < typename T >
-inline uchar8 byte_cast( T x )
-{
-	return uchar8( ( x ) & 255 );
+inline nv::uchar8 byte_cast( T x )
+{
+	return nv::uchar8( ( x ) & 255 );
 }
 
@@ -246,7 +246,12 @@
 }
 
+static int iabs( int i )
+{
+	return i >= 0 ? i : -i;
+}
+
 static unsigned char stbiw__paeth( int a, int b, int c )
 {
-	int p = a + b - c, pa = abs( p - a ), pb = abs( p - b ), pc = abs( p - c );
+	int p = a + b - c, pa = iabs( p - a ), pb = iabs( p - b ), pc = iabs( p - c );
 	if ( pa <= pb && pa <= pc ) return byte_cast( a );
 	if ( pb <= pc ) return byte_cast( b );
@@ -320,5 +325,5 @@
 				if ( p ) break;
 				for ( i = 0; i < x*n; ++i )
-					est += abs( (signed char)line_buffer[i] );
+					est += iabs( (signed char)line_buffer[i] );
 				if ( est < bestval ) { bestval = est; best = k; }
 			}
Index: trunk/src/lua/lua_proxy.cc
===================================================================
--- trunk/src/lua/lua_proxy.cc	(revision 550)
+++ trunk/src/lua/lua_proxy.cc	(revision 551)
@@ -76,4 +76,10 @@
 }
 
+const nv::type_database* nv::lua::stack_proxy::get_type_db() const
+{
+	NV_ASSERT( m_state->get_type_data(), "type database not created!" );
+	return m_state->get_type_data()->get_type_database();
+}
+
 nv::string_view nv::lua::stack_proxy::get_string_view() const
 {
