Errors fixed. GCC 4.6.3 compatible